<?php
class d {
	
	function d($var, $rotulo = '', $caminhoCompleto = false) {
		$i = 0;
		echo '<pre>';
		foreach (debug_backtrace() as $debug) {
			if ($caminhoCompleto) {
				echo '#' . $i++ . "\t" . $debug['function'] . '() called at ';
			}
			echo '[' . $debug['file'] . ':' . $debug['line'] . ']' . "\n";
			if (!$caminhoCompleto) {
				break;
			}
		}
		echo $rotulo . ':';
		var_dump($var);
		echo '</pre>';
	}
	
}